<style tyle="text/css">
	.modal-lg {
		width: 60%;
	}
</style>
<div class="modal-header">
	<h4 class="modal-title">一卡通信息</h4>
</div>
<div class="modal-body">

	<form name="form" class="form-horizontal form-validation ng-pristine ng-valid ng-valid-required">
		<div ng-if="addStatus">
			<div class="form-group">
				<h4 class="col-xs-4 control-label">所属景区:</h4>
				<h4 class="col-xs-4">
					<ui-select ng-model="card.view_code" theme="bootstrap">
						<ui-select-match placeholder="选择所属景区...">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices repeat="item.code as item in viewList">
							<span ng-bind-html="item.name | highlight: $select.search"></span>
						</ui-select-choices>
					</ui-select>
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">卡面号:</h4>
				<h4 class="col-sm-4">
					<input type="text" class="form-control" ng-model="card.smart_card_no">
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">卡内号:</h4>
				<h4 class="col-sm-4">
					<input type="text" class="form-control" ng-model="card.smart_card">
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">卡类型</h4>
				<h4 class="col-sm-4">
					<ui-select ng-model="card.card_type" theme="bootstrap">
						<ui-select-match placeholder="选择卡类型...">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices repeat="item.code as item in category_list">
							<span ng-bind-html="item.name | highlight: $select.search"></span>
						</ui-select-choices>
					</ui-select>
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">是否需要密码</h4>
				<h4 class="col-sm-4">
					<select type="text" class="form-control" ng-model="card.is_need_password">
						<option value="0">不需要</option>
						<option value="1">需要</option>
					</select>
				</h4>
			</div>
			<div class="form-group" ng-show="card.is_need_password == '1'">
				<h4 class="col-lg-4 control-label">密&nbsp;&nbsp;&nbsp;&nbsp;码:</h4>
				<h4 class="col-sm-4">
					<input type="password" class="form-control" ng-model="card.password">
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">状态</h4>
				<h4 class="col-sm-4">
					<select type="text" class="form-control" ng-model="card.status">
						<option value="0">初始状态</option>
						<option value="1">使用中</option>
					</select>
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">此卡应交押金（元）:</h4>
				<h4 class="col-sm-4">
					<input type="number" class="form-control" ng-model="card.deposit" min="0">
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">有效期开始:</h4>
				<h4 class="col-sm-4">
					<input type="text" 
						class="form-control" 
						datepicker-popup="yyyy-MM-dd" 
						ng-model="period_start.value" 
						is-open="period_start.opened" 
						ng-click="dateOpen($event, period_start)"
						placeholder="开始时间" 
						ng-required="true" 
						close-text="关闭" 
						current-text="今天" 
						clear-text="清除" 
						readonly/>
				</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-4 control-label">有效期结束:</h4>
				<h4 class="col-sm-4">
					<input type="text" 
						class="form-control" 
						datepicker-popup="yyyy-MM-dd" 
						ng-model="period_end.value" 
						is-open="period_end.opened" 
						ng-click="dateOpen($event, period_end)"
						placeholder="开始时间" 
						ng-required="true" 
						close-text="关闭" 
						current-text="今天" 
						clear-text="清除" 
						readonly/>
				</h4>
			</div>
		</div>
		<div ng-if="!addStatus">
			<div class="form-group">
				<h4 class="col-lg-3 control-label">卡面号:</h4>
				<h4 class="col-lg-2 control-label text-left">{{card.smart_card_no}}</h4>
				<h4 class="col-lg-3 control-label">卡内号:</h4>
				<h4 class="col-lg-3 control-label text-left">{{card.smart_card}}</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-3 control-label">卡状态:</h4>
				<h4 class="col-lg-2 control-label text-left">{{card.status==1?'使用中':'初始状态'}}</h4>
				<h4 class="col-lg-3 control-label">批次号:</h4>
				<h4 class="col-lg-3 control-label text-left">{{card.batch}}</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-3 control-label">是否需要密码:</h4>
				<h4 class="col-lg-2 control-label text-left">{{card.is_need_password == '0'? '不需要': '需要'}}</h4>
				<h4 class="col-lg-3 control-label">卡类型:</h4>
				<h4 class="col-lg-3 control-label text-left">{{card.card_type_name}}</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-3 control-label">所属景区:</h4>
				<h4 class="col-lg-3 control-label text-left">{{card.view_name}}</h4>
			</div>
			<div class="line line-dashed b-b line-lg pull-in"></div>
			<div class="form-group">
				<h4 class="col-lg-3 control-label">应交押金(元):</h4>
				<h4 class="col-lg-2 control-label text-left">{{card.deposit || 0}}</h4>
				<h4 class="col-lg-3 control-label">初始预存(元):</h4>
				<h4 class="col-lg-3 control-label text-left">{{card.total || 0}}</h4>
			</div>
			<div class="form-group">
				<h4 class="col-lg-3 control-label">余额(元):</h4>
				<h4 class="col-lg-2 control-label text-left">{{card.balance || 0}}</h4>
				<h4 class="col-lg-3 control-label">已消费(元):</h4>
				<h4 class="col-lg-3 control-label text-left">{{card.spend || 0}}</h4>
			</div>
		</div>
	</form>

</div>

<div class="modal-footer">
	<button class="btn btn-success" ng-if="addStatus" type="button" ng-click="ok()">确定</button>
	<button class="btn btn-danger" type="button" ng-click="close()">关闭</button>
</div>